package com.thomasmoerman.dci3.tmc

import com.thomasmoerman.dci3.domain._
import scala.collection.JavaConversions._

trait CalculatedBalanceAspect {
  
  abstract class CalculatedBalance(self: Account) {
	
	lazy val balance = self.moneyTransfers.map(_.amount).foldLeft(0.0)(_ + _)

  }

}